Image processing apparatus and control method thereof

ABSTRACT

According to an image processing apparatus and a control method thereof of the present invention, a graphics drawing result is obtained in accordance with one or more graphics drawing commands included in drawing commands, a clipping command is generated from one or more moving image drawing commands included in the drawing commands, and clipped graphics is obtained by clipping the graphics drawing result using the clipping command. Further, moving image data processed in accordance with the one or more moving image drawing commands included in the drawing commands is generated, and the generated moving image data and the clipped graphics are composed and output.

TECHNICAL FIELD

The present invention relates to an image processing apparatus forcomposing graphics and moving image data input thereto, and to a controlmethod thereof.

BACKGROUND ART

Conventionally, an image that includes a moving image and graphics wasconstituted by capturing a frame image of the moving image and combiningthe graphics with the frame image, which is treated as a still image.However, the use application of images, the data format and the type ofdrawing process required differ between moving images and graphics. Forexample, in the case of moving images, a technique that prevents areduction in moving image quality due to dropped frames or the like issought. The systems for processing moving images and graphics aretherefore separated, and the output results of the respective processingsystems are composed and output.

Japanese Patent Laid-Open No. 07-72850, which relates to an imageforming apparatus that composes and outputs a moving image and graphics,proposes a method for composing graphics data and moving image datastored in memory while switching the readout addresses in memory.Japanese Patent Laid-Open No. 2005-321481 proposes achieving highquality video by keeping a video signal processing function independentfrom a graphics controller, and inputting images created by the graphicscontroller as video signals.

However, while the respective quality of moving images and graphics canbe enhanced according to the above-mentioned conventional methods sincethe systems for processing a moving image and graphics are separated, inthe case where a moving image and graphics are displayed so as tooverlap, a plurality of buffers are needed for storing the graphicsdrawing results in order for display to be performed correctly. Theresultant increase in device cost was problematic.

DISCLOSURE OF INVENTION

An aspect of the present invention is to eliminate the above-mentionedproblems with the conventional technology.

An aspect of the present invention is to provide a technique beingcapable of composing a moving image and a graphic by reducing a capacityof a memory that stores graphics drawing results.

According to an aspect of the present invention, there is provided animage processing apparatus for receiving drawing commands that includeone or more moving image drawing commands and one or more graphicsdrawing commands, and performing a drawing process, comprising:

graphics drawing means for obtaining a graphics drawing result inaccordance with the one or more graphics drawing commands included inthe drawing commands;

clipping means for generating a clipping command based on the one ormore moving image drawing commands included in the drawing commands;

storage means for storing clipped graphics obtained by clipping thegraphics drawing result using the clipping command;

moving image drawing means for generating moving image data processed inaccordance with the one or more moving image drawing commands includedin the drawing commands; and

composition means for composing the clipped graphics stored in thestorage means and the moving image data generated by the moving imagedrawing means.

According to another aspect of the present invention, there is provideda control method of an image processing apparatus for receiving drawingcommands that include one or more moving image drawing commands and oneor more graphics drawing commands, and performing a drawing process, themethod comprising:

a graphics drawing step of obtaining a graphics drawing result inaccordance with the one or more graphics drawing commands included inthe drawing commands;

a clipping step of generating a clipping command from the one or moremoving image drawing commands included in the drawing commands;

a storage step of storing clipped graphics obtained by clipping thegraphics drawing result using the clipping command;

a moving image drawing step of generating moving image data processed inaccordance with the one or more moving image drawing commands includedin the drawing commands; and

a composition step of composing the clipped graphics stored in thestorage step and the moving image data generated in the moving imagedrawing step.

Further features and aspects of the present invention will becomeapparent from the following description of exemplary embodiments, withreference to the attached drawings.

BRIEF DESCRIPTION OF DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of the specification, illustrate embodiments of the invention and,together with the description, serve to explain the principles of theinvention.

FIG. 1 is a block diagram describing a schematic configuration of animage processing apparatus according to exemplary embodiments of thepresent invention.

FIG. 2 is a functional block diagram illustrating functions of the imageprocessing apparatus according to the exemplary embodiments.

FIGS. 3A to 3E depict views describing exemplary drawing commands inputto the image processing apparatus according to a first embodiment of thepresent invention, and exemplary results from executing the drawingcommands.

FIGS. 4A to 4D are schematic diagrams showing the content of graphicsdrawing results stored by a graphics storage unit when the drawingcommands shown in FIG. 3A are executed sequentially.

FIG. 5 is a schematic diagram illustrating a moving image drawingprocess according to the first embodiment.

FIG. 6 is a schematic diagram illustrating a composition process in acomposition unit according to the first embodiment.

FIGS. 7A to 7B depict views describing an exemplary sequence of drawingcommands input to the image processing apparatus according to a secondembodiment of the present invention, and exemplary results of executingthe drawing commands.

FIGS. 8A to 8D are schematic diagrams showing the exemplary content ofgraphics drawing results stored by the graphics storage unit when thedrawing commands shown in FIG. 7A are executed sequentially.

FIG. 9 depicts a view describing a moving image drawing process in amoving image drawing unit according to the second embodiment.

FIG. 10 is a schematic diagram illustrating a composition process in acomposition unit according to the second embodiment.

BEST MODE FOR CARRYING OUT THE INVENTION

Embodiments of the present invention will now be described hereinafterin detail, with reference to the accompanying drawings. It is to beunderstood that the following embodiments are not intended to limit theclaims of the present invention, and that not all combinations of theaspects that are described according to the following embodiments arenecessarily required with respect to the means to solve the problemsaccording to the present invention.

FIG. 1 is a block diagram describing a schematic configuration of animage processing apparatus according to exemplary embodiments of thepresent invention.

In FIG. 1, a CPU 102 controls operation of the image processingapparatus in accordance with programs loaded in a ROM 103 or a RAM 104.The ROM 103 stores programs and various parameters that do not requiremodification. The RAM 104 is constituted by a SDRAM, a DRAM or the like,and provides a work area for use by the CPU 102, as well as being usedfor temporarily storing programs supplied from an external device or thelike and various data such as image data. A display unit 105 displaysimages drawn by programs. A system bus 101 connects the CPU 102, the ROM103, the RAM 104 and the display unit 105 to one another.

FIG. 2 is a functional block diagram illustrating the functions of animage processing apparatus 201 according to the exemplary embodiments.

In FIG. 2, a drawing controller 202 in the image processing apparatus201 according to the present embodiment inputs drawing commandsincluding one or more moving image drawing commands and one or moregraphics drawing commands, and creates graphics. A graphics storage unit203 stores the created graphics. A moving image drawing unit 204 createsmoving image frames in accordance with input moving image data andinstructions from a drawing command separator 206, and outputs createdmoving image frames to a composition unit 205. The composition unit 205composes graphics and moving images.

The drawing controller 202 includes the drawing command separator 206, agraphics drawing unit 207, and a clipping unit 208. The drawing commandseparator 206 receives drawing commands and separates received drawingcommands into graphics drawing commands and moving image drawingcommands. The graphics drawing unit 207 creates graphics by executinggraphics drawing commands separated by the drawing command separator206, and stores created graphics in the graphics storage unit 203. Theclipping unit 208 acquires parameters representing the geometricinformation of a moving image from moving image drawing commandsseparated by the drawing command separator 206. The clipping unit 208then generates a clipping command for graphics drawn by the graphicsdrawing unit 207, and outputs the generated clipping command to thegraphics storage unit 203. The graphics storage unit 203 thereby obtainsclipped graphics by performing a clipping process in accordance with theclipping command on graphics stored therein. The moving image drawingunit 204 receives moving image data, acquires the parameters of atwo-dimensional affine transformation, for example, for a moving imagefrom moving image drawing commands separated by the drawing commandseparator 206, and performs a transformation process on the moving imagedata. The composition unit 205 composes graphics stored in the graphicsstorage unit 203 and moving image data transformed by the moving imagedrawing unit 204, and outputs the resultant composition image to thedisplay unit 105 for display.

First Embodiment

Next, the flow of processing in the image processing apparatus accordingto a first embodiment of the present invention will be described. Thegeometric information of a moving image according to the firstembodiment is represented by the parameters of a two-dimensional affinetransformation.

FIG. 3A depicts a view describing exemplary drawing commands input tothe image processing apparatus according to the present embodiment.

These drawing commands include a rectangle drawing command 301, a movingimage drawing command 302, a rectangle drawing command 303 and a movingimage drawing command 304, and are called in the order shown in FIG. 3A.The rectangle drawing command 301 is for drawing a rectangle withlower-left corner at (x1, y1), width w1 in the X-axis direction andheight h1 in the Y-axis direction with a color c1. This rectangle isshown by a rectangle 305 in FIG. 3B. The rectangle drawing command 303is similarly for drawing a rectangle with lower-left corner at (x3, y3),width w3 in the X-axis direction and height h3 in the Y-axis directionwith a color c3. This rectangle is shown by a rectangle 306 in FIG. 3D.

The moving image drawing command 302 is for scaling the moving image bysx2 in the X-axis direction and sy2 in the Y-axis direction, andtranslating the moving image by x2 in the X-axis direction and y2 in theY-axis direction. This rectangle is shown by a rectangle 307 in FIG. 3C.The moving image drawing command 304 is similar for scaling the movingimage by sx4 in the X-axis direction and sy4 in the Y-axis direction,and translating the moving image by x4 in the X-axis direction and y4 inthe Y-axis direction. This rectangle is shown by a rectangle 308 in FIG.3E.

The drawing content in the case where the respective drawing processesare independently executed are shown in FIGS. 3B to 3E. In FIG. 3C, thewidth vw2 of the image results from scaling the width of the movingimage by sx2, and the height vh2 results from scaling the height of themoving image by sy2. Similarly, the width vw4 of the image in FIG. 3Eresults from scaling the width of the moving image by sx4, and theheight vh4 results from scaling the height of the moving image by sy4.Note that while the present embodiment is described using scaling andtranslation as a two-dimensional affine transformation, rotation,skewing or the like may be used, or an affine transformation thatcombines these transformations may be used.

The drawing command separator 206 receives drawing commands one at atime, and separates these drawing commands into moving image drawingcommands and graphics drawing commands. If the input drawing command isa graphics drawing command, the graphics drawing unit 207 receives thegraphics drawing command and creates graphics by executing the graphicsdrawing command. The graphics thus created are stored in the graphicsstorage unit 203. On the other hand, if the input drawing command is amoving image drawing command, firstly a clipping command is generated bythe clipping unit 208 and stored in the graphics storage unit 203. Thegraphics storage unit 203 thereby performs a clipping process ongraphics stored therein. Here, the clipping command is generated so asto calculate an area that will be occupied by the moving image from theparameters of the moving image drawing command and to eliminate thegraphics in the area. The drawing command separator 206 sends the movingimage drawing command to the moving image drawing unit 204, after theinstruction for the clipping process has been given by the clipping unit208. The moving image drawing unit 204 receives the moving image drawingcommand and performs a transformation process on the moving image data.The composition unit 205 composes a plurality of transformed movingimages input from the moving image drawing unit 204 starting with themoving image whose drawing command was input first, and then composesgraphics input from the graphics storage unit 203 over the composedmoving images. The processing after input of drawing commands has beenreceived will be described using the figures, with the drawing commandsshown in FIG. 3A as examples. Firstly, the graphics drawing process willbe described.

FIGS. 4A to 4D are schematic diagrams describing the content of graphicsdrawing results stored by the graphics storage unit 203 when the drawingcommands shown in FIG. 3A are executed sequentially.

Firstly, the content of graphics drawing results stored by the graphicsstorage unit 203 is cleared and made transparent. When the rectangledrawing command 301 shown in FIG. 3A is input, this drawing command isdetermined by the drawing command separator 206 to be a graphics drawingcommand, and processing is executed by the graphics drawing unit 207. Arectangle is thereby drawn with the color c1, as shown in FIG. 4A.Reference numeral 411 in FIG. 4A denotes this drawing result.

Next, when the moving image drawing command 302 shown in FIG. 3A isinput, this drawing command is determined by the drawing commandseparator 206 to be a moving image drawing command, and a clippingcommand 421 is generated by the clipping unit 208. The processing inthis case is shown in FIG. 4B. This clipping command 421 changes thecolor values of pixels in the area of the rectangle with lower-leftcorner at (x2, y2), width vw2 in the X-axis direction and height vh2 inthe Y-axis direction to make the pixels transparent. The drawing resultwhen this clipping command 421 is processed will be as shown byreference numeral 412. In FIG. 4B, the rectangular area in FIG. 4A(equivalent to 305 in FIG. 3B) has been clipped with the area shown by307 in FIG. 3C.

Next, when the rectangle drawing command 303 shown in FIG. 3A is input,processing is executed by the graphics drawing unit 207, and a rectangleis drawn with the color c3 (FIG. 4C). This rectangle is equivalent to306 in FIG. 3D. A drawing result 413 shown in FIG. 4C is obtained bythis processing.

Next, when the moving image drawing command 304 shown in FIG. 3A isinput, this drawing command is determined by the drawing commandseparator 206 to be a moving image drawing command, and a clippingcommand 422 (FIG. 4D) is generated by the clipping unit 208. This is forclipping the rectangle 306 in FIG. 3D with the rectangle 308 in FIG. 3E.The clipping command 422 clips the area of the rectangle with lower-leftcorner (x4, y4), width vw4 in the X-axis direction and height vh4 in theY-axis direction, and a drawing result 414 shown in FIG. 4D is obtainedby this clipping process.

Next, the moving image drawing process will be described using theschematic diagram of FIG. 5.

FIG. 5 is a schematic diagram describing the moving image drawingprocess according to the first embodiment of the present invention.

The moving image drawing unit 204 has a plurality of moving imageprocessing units (503, 504), and these moving image processing unitscorrespond one-to-one with the moving image drawing commands. Here,moving image data drawn using the moving image drawing command 302 isgiven as moving image data 501, and moving image data drawn using themoving image drawing command 304 is given as moving image data 502. Amoving image processing unit 503 processes the moving image drawingcommand 302, and a moving image processing unit 504 processes the movingimage drawing command 304. The moving image processing units 503 and 504respectively receive the moving image data 501 and 502. Note that herethe format of moving image data may be any of MPEG-1, MPEG-2, AVI or thelike, and is not specified here. Further, the moving image processingunits 503 and 504 respectively perform a transformation process on thismoving image data in accordance with the moving image drawing commandssupplied from the drawing command separator 206. For example, the movingimage processing unit 503 scales the moving image data 501 by sx2 in theX-axis direction and sy2 in the Y-axis direction, and translates themoving image data 501 by x2 in the X-axis direction and y2 in the Y-axisdirection, based on the parameters in the moving image drawing command302, as a result of which transformed moving image data 505 is obtained.The moving image processing unit 504 similarly scales the moving imagedata 502 by sx4 in the X-axis direction and sy4 in the Y-axis direction,and translates the moving image data 502 by x4 in the X-axis directionand y4 in the Y-axis direction, based on the parameters in the movingimage drawing command 304, as a result of which transformed moving imagedata 506 is obtained. These processes are the same as those illustratedwith the foregoing FIGS. 3C and 3E.

FIG. 6 is a schematic diagram describing the composition process in thecomposition unit 205 according to the present embodiment.

The drawing result 414 from the graphics storage unit 203 and thetransformed moving image data 505 and 506 are input to the compositionunit 205. The composition unit 205 firstly inputs the transformed movingimage data 505 and 506, and composes these moving image data. Thetransformed moving image data 505 and 506 are respectively generatedusing the moving image drawing command 302 and the moving image drawingcommand 304. Because the moving image drawing command 302 is input tothe drawing controller 202 before the moving image drawing command 304,the composition process is performed by layering the transformed movingimage data 505 and 506 such that the moving image data 505 is positionedunder the moving image data 506. A composition result with the movingimage data 506 placed over the moving image data 505 is obtained as aresult, as shown by 611 in FIG. 6. Next, the drawing result 414 storedin the graphics storage unit 203 and the moving image composition result611 are composed. This time the composition process is performed bylayering the moving image composition result 611 and the drawing result414 such that the moving image composition result 611 is under thedrawing result 414. A composition result 612 from composing movingimages and graphics is thus ultimately obtained, and this compositionresult is displayed on the display unit 105.

Note that while the first embodiment was described in terms of twomoving image drawing commands being included in the drawing commands,the present invention is realized even in the case of there being onemoving image drawing command or three or more moving image drawingcommands. Also, while the composition process is here performed startingwith the moving image, the composition process may be performed in anyorder provided that the hierarchical relation of the layers ismaintained.

Second Embodiment

Hereinafter, a second embodiment of the present invention will bedescribed with reference to the figures. Note that because the hardwareconfiguration and the functional configuration of the image processingapparatus according to the second embodiment are the same as thatdescribed for the foregoing first embodiment, description thereof willbe omitted.

Next, the flow of processing in the image processing apparatus accordingto the second embodiment of the present invention will be described.Here, the geometric information of a moving image used in the secondembodiment is represented by a mask image (mask information) as well asby specification of the parameters of a two-dimensional affinetransformation.

FIG. 7A shows an exemplary sequence of drawing commands input to theimage processing apparatus according to the second embodiment.

These drawing commands include a polygonal drawing command 701, a movingimage drawing command 702, an elliptic drawing command 703 and a movingimage drawing command 704, and are called in the respective order inwhich they are input. Next, the drawing results from the respectivedrawing commands will be described using the schematic diagram shown inFIG. 7B.

The polygonal drawing command 701 is a graphics drawing command in whichsix X coordinates and Y coordinates are here transferred as an array px[], py[ ]. For example, in the case of a hexagon, line segments are drawnin the order (px[0], py[0]), (px[1], PY[1]), (Px[2], PY[2]), (Px[3],PY[3]), (Px[4], PY[4]), (px[5], py[5]) and (px[0], py[0]). The areaenclosed by these line segments is then filled in with a color cp.Reference numeral 710 in FIG. 7B shows an exemplary polygon drawn usingthis polygonal drawing command 701.

The elliptic drawing command 703 is a graphics drawing command forfilling in an ellipsoid with central coordinates (cx, cy), width 2 rxand height 2 ry, that is, the pixels of coordinates (x, y) satisfying anequation represented by the following expression (1) with a color ce.Reference numeral 711 in FIG. 7B shows an exemplary ellipsoid drawnusing this elliptic drawing command 703.

(x−cx)² /rx ²+(y−cy)² /ry ²≦1   (1)

The moving image drawing command 702 performs a masking process onmoving image data using mask image data m5, scales the masked movingimage by sx5 in the X-axis direction and sy5 in the Y-axis direction,and translates the masked moving image by x5 in the X-axis direction andy5 in the Y-axis direction. Mask image data m5 is provided with a “0” or“1” mask value for each pixel of input moving image data 712, and themoving image data 712 is transformed such that pixels whose mask valueis “0” will be transparent and pixels whose mask value is “1” will bethe color of the pixels in the moving image data.

A mask image 722 illustrates the mask image data m5. The mask values ofthe black area are “0” and the mask values of the white area are “1”.Masked moving image data 732 is generated by processing the moving imagedata 712 using this mask image 722. Moving image data such as shown by713 in FIG. 7B is obtained using the moving image drawing command 702.Here, the width vw5 of the moving image results from scaling the widthof the moving image 712 by sx5, and the height vh5 results from scalingthe height of the moving image 712 by sy5.

The moving image drawing command 704 similarly performs a maskingprocess on moving image data using mask image data m6, scales the maskedmoving image by sx6 in the X-axis direction and sy6 in the Y-axisdirection, and translates the masked moving image by x6 in the X-axisdirection and y6 in the Y-axis direction. A mask image 724 illustratesthe mask image data m6, and masked moving image data 734 is generated byperforming the masking process on moving image data 714. Moving imagedata such as shown by 715 in FIG. 7B is obtained using the moving imagedrawing command 704. Here, the width vw6 of the moving image resultsfrom scaling the width of the moving image data 714 by sx6, and theheight vh6 results from scaling the height of the moving image data 714by sy6.

Next, the processing after drawing commands such as shown in FIG. 7A arereceived in the second embodiment will be described using the examplesshown in FIGS. 7A and 7B. Firstly, the graphics drawing process will bedescribed.

FIGS. 8A to 8D are schematic diagrams describing the exemplary contentof graphics drawing results stored by the graphics storage unit 203 whenthe drawing commands shown in FIG. 7A are executed sequentially.

Firstly, the content of graphics drawing results stored by the graphicsstorage unit 203 is cleared and all of the pixels are made transparent.

When the polygonal drawing command 701 in FIG. 7A is input, this drawingcommand is determined by the drawing command separator 206 to be agraphics drawing command, and a polygon is drawn with a color cp as aresult of a drawing process being executed by the graphics drawing unit207, as shown in FIG. 8A. The drawing result stored by the graphicsstorage unit 203 will be as shown by a drawing result 911.

Next, when the moving image drawing command 702 in FIG. 7A is input,this drawing command is determined by the drawing command separator 206to be a moving image drawing command. New mask image data m15 obtainedby scaling the mask image data m5 by sx5 in the X-axis direction and sy5in the Y-axis direction and translating the mask image data m5 by x5 inthe X-axis direction and y5 in the Y-axis direction is then generated bythe clipping unit 208. As shown in FIG. 8B, a clipping command 921 isthen generated with this generated mask image data m15 as a parameter.This clipping command 921 is for converting the graphics drawing result911 to make pixels whose mask value in the mask image data m15 is “1”transparent. A drawing result 912 shown in FIG. 8B is then obtained byexecuting this clipping command 921.

When the ellipsoid drawing command 703 in FIG. 7A is input, an ellipsoidis drawn with a color ce as a result of a drawing process being executedby the graphics drawing unit 207 to obtain a drawing result 913, asshown in FIG. 8C.

Next, when the moving image drawing command 704 in FIG. 7A is input,this drawing command is determined by the drawing command separator 206to be a moving image drawing command. New mask image data m16 obtainedby scaling the mask image data m6 by sx6 in the X-axis direction and sy6in the Y-axis direction and translating the mask image data m6 by x6 inthe X-axis direction and y6 in the Y-axis direction is then generated bythe clipping unit 208. As shown in FIG. 8D, a clipping command 922 isthen generated with this generated mask image data m16 as a parameterand processed. This clipping command 922 is for converting the graphicsdrawing result to make pixels whose mask value in the mask image datam16 is “1” transparent. A drawing result 914 is then obtained byexecuting this clipping command 922.

FIG. 9 illustrates the moving image drawing process in the moving imagedrawing unit 204 according to the second embodiment.

The moving image drawing unit 204 has a plurality of moving imageprocessing units (1003, 1004), and these moving image processing unitscorrespond one-to-one with the moving image drawing commands. Movingimage data processed by a moving image processing unit 1003 inaccordance with the moving image drawing command 702 shown in theforegoing FIG. 7A is given as moving image data 712, and moving imagedata processed by a moving image processing unit 1004 in accordance withthe moving image drawing command 704 is given as moving image data 714.The moving image processing units 1003 and 1004 respectively receive themoving image data 712 and 714. The format of the moving image data atthis time may be any of MPEG-1, MPEG-2, AVI or the like, and is notspecified here. Further, the drawing command separator 206 receivesmoving image drawing commands, and the moving image processing units1003 and 1004 perform a masking process and a transformation process onthe respective moving image data in accordance with the moving imagedrawing commands. The moving image processing unit 1003 firstlytransforms the moving image data 712 using the mask image data m5, basedon the parameters in the moving image drawing command 702. Further, themoving image processing unit 1003 then scales the moving image data bysx5 in the X-axis direction and sy5 in the Y-axis direction andtranslates the moving image data by x5 in the X-axis direction and y5 inthe Y-axis direction, and outputs processed moving image data 1005.Similarly, the moving image processing unit 1004 transforms the movingimage data using the mask image data m6, based on the parameters in themoving image drawing command 704. Further, the moving image processingunit 1004 scales the moving image data by sx6 in the X-axis directionand sy6 in the Y-axis direction and translates the moving image data byx6 in the X-axis direction and y6 in the Y-axis direction, and outputsprocessed moving image data 1006.

FIG. 10 is a schematic diagram describing the composition process in thecomposition unit 205 according to the second embodiment.

Here, the drawing result 914 shown in FIG. 8D and the processed movingimage data 1005 and 1006 shown in FIG. 9 are input to the compositionunit 205. The composition unit 205 firstly composes the processed movingimage data 1005 and the processed moving image data 1006. As illustratedwith FIG. 9, the processed moving image data 1005 is generated using themoving image drawing command 702, and the processed moving image data1006 is generated using the moving image drawing command 704. Here,because the moving image drawing command 702 is input to the drawingcontroller 202 before the moving image drawing command 704, thecomposition process is performed by layering the processed moving imagedata 1005 and 1006 such that the moving image data 1005 is under themoving image data 1006. A moving image composition result 1111 isobtained as a result.

Next, the drawing result 914 stored in the graphics storage unit 203 andthe moving image composition result 1111 are composed. This time thecomposition process is performed by layering the moving imagecomposition result 1111 and the drawing result 914 such that the movingimage composition result 1111 is under the drawing result 914. Acomposition result 1112 from composing moving images and graphics isthus ultimately obtained, and this composition result is displayed onthe display unit 105.

Other Embodiments

While the embodiments of the present invention have been detailed above,the present invention may be applied to a system constituted by aplurality of devices or to an apparatus composed of a single device.

Note that the present invention can be achieved by a software programfor realizing the functions of the foregoing embodiments being directlyor remotely supplied to a system or an apparatus, and a computer in thesystem or apparatus reading out and executing the supplied program. Inthis case, as long as the functions of the program are provided, thisembodiment need not be in the form of a program.

Consequently, the present invention is also realized by the actualprogram code installed on a computer, in order to realize the functionsand processes of the present invention by computer. In other words, theclaims of the present invention also encompass the actual computerprogram for realizing the functions and processes of the presentinvention. In this case, as long as the functions of the program areprovided, the program may take any form, such as an object code, aprogram executed by an interpreter, script data supplied to an operatingsystem, or the like.

The functions of the foregoing embodiments can be realized in formsother than by a computer executing the read program. For example, anoperating system or the like running on a computer can perform part orall of the actual processing based on instructions in the program, andthe functions of the foregoing embodiments can be realized by thisprocessing.

While the present invention has been described with reference toembodiments, it is to be understood that the invention is not limited tothe disclosed exemplary embodiments. The scope of the following claimsis to be accorded the broadest interpretation so as to encompass allsuch modifications and equivalent structures and functions.

This application claims the benefit of Japanese Patent Application No.2008-154589, filed Jun. 12, 2008, which is hereby incorporated byreference herein in its entirety.

1. An image processing apparatus for receiving drawing commands thatinclude one or more moving image drawing commands and one or moregraphics drawing commands, and performing a drawing process, comprising:graphics drawing means for obtaining a graphics drawing result inaccordance with the one or more graphics drawing commands included inthe drawing commands; clipping means for generating a clipping commandbased on the one or more moving image drawing commands included in thedrawing commands; storage means for storing clipped graphics obtained byclipping the graphics drawing result using the clipping command; movingimage drawing means for generating moving image data processed inaccordance with the one or more moving image drawing commands includedin the drawing commands; and composition means for composing the clippedgraphics stored in the storage means and the moving image data generatedby the moving image drawing means.
 2. The image processing apparatusaccording to claim 1, further comprising separation means for receivingthe drawing commands, separating the received drawing commands into oneor more moving image drawing commands and one or more graphics drawingcommands, supplying the one or more moving image drawing commands to theclipping means and the moving image drawing means, and supplying the oneor more graphics drawing commands to the graphics drawing means.
 3. Theimage processing apparatus according to claim 1, wherein the one or moremoving image drawing commands include geometric information, theclipping command is for clipping an area to be occupied by a movingimage in accordance with the geometric information, and the moving imagedrawing means outputs moving image data obtained by processing themoving image in accordance with the geometric information.
 4. The imageprocessing apparatus according to claim 3, wherein the geometricinformation is a parameter of an affine transformation.
 5. The imageprocessing apparatus according to claim 3, wherein the geometricinformation is mask information for a moving image.
 6. The imageprocessing apparatus according to claim 1, wherein the composition meanscomposes the moving image data in an order in which the one or moremoving image drawing commands are input, and composes the composedmoving image data and the clipped graphics such that the composed movingimage data is positioned under the clipped graphics.
 7. A control methodof an image processing apparatus for receiving drawing commands thatinclude one or more moving image drawing commands and one or moregraphics drawing commands, and performing a drawing process, the methodcomprising: a graphics drawing step of obtaining a graphics drawingresult in accordance with the one or more graphics drawing commandsincluded in the drawing commands; a clipping step of generating aclipping command from the one or more moving image drawing commandsincluded in the drawing commands; a storage step of storing clippedgraphics obtained by clipping the graphics drawing result using theclipping command; a moving image drawing step of generating moving imagedata processed in accordance with the one or more moving image drawingcommands included in the drawing commands; and a composition step ofcomposing the clipped graphics stored in the storage step and the movingimage data generated in the moving image drawing step.
 8. The controlmethod according to claim 7, further comprising a separation step ofreceiving the drawing commands, separating the received drawing commandsinto one or more moving image drawing commands and one or more graphicsdrawing commands, supplying the one or more moving image drawingcommands to the clipping step and the moving image drawing step, andsupplying the one or more graphics drawing commands to the graphicsdrawing step.
 9. The control method according to claim 7, wherein theone or more moving image drawing commands include geometric information,the clipping command is for clipping an area to be occupied by a movingimage in accordance with the geometric information, and in the movingimage drawing step, moving image data obtained by processing the movingimage in accordance with the geometric information is output.
 10. Thecontrol method according to claim 9, wherein the geometric informationis a parameter of an affine transformation.
 11. The control methodaccording to claim 9, wherein the geometric information is maskinformation for a moving image.
 12. The control method according toclaim 7, wherein in the composition step, the moving image data iscomposed in an order in which the one or more moving image drawingcommands are input, and the composed moving image data and the clippedgraphics are composed such that the composed moving image data ispositioned under the clipped graphics.